1. Technical Field
The present invention relates to a pixel interpolation apparatus, a pixel interpolation method and an image reading apparatus, which interpolate a missing pixel.
2. Description of Prior Art
A contact line image sensor (Contact Image Sensor, called CIS hereafter), which is used for an image reading apparatus for optically reading a document image, is configured so that a plurality of sensor chips arranged in series share the reading length of one line. At the connecting section of the sensor chips, there is a section in which an image sensor of approximately one pixel does not exist because of the physical constraint. One missing pixel, which cannot be read as an image, is generated. For example, FIG. 13a illustrates a state in which a diagonal line is read by a section without a missing pixel. However, in case when the same diagonal line is read by a section with a missing pixel, pixels marked with “x” become missing as illustrated in FIG. 13b. In FIGS. 13a, 13b and 13c, a white circle represents an existing white pixel, a black circle represents an existing black pixel and a symbol “x” represents a missing pixel.
In case when image data outputted by the contact line image sensor, in which such missing pixel is generated, is used without considering the generation of missing pixel, an affected streak occurs in the missing pixel section as illustrated in FIG. 13c. Therefore, the missing pixel is interpolated by a method for maintaining the continuity with the peripheral pixel in one-dimensional direction (for example, the line direction of the contact line image sensor), and the streak is made less visible.
For example, there is an interpolation method (for example, refer to Unexamined Japanese Patent Application Publication No. 2005-117291: JPA2005-117291) that sets an interpolation value of a missing pixel so that an average value of a predetermined range in one-dimensional direction containing the missing pixel (for example, the missing pixel and one pixel each from left and right of the missing pixel in the direction of the reading line of the line image sensor) and an average value of the predetermined range in one-dimensional direction in the peripheral of the missing pixel not containing the missing pixel (for example, three pixels from left and right that sandwich the missing pixel in the direction of the reading line of the line image sensor) equal with each other.
With respect to a method that calculates the interpolation value of the missing pixel from the peripheral pixels in one-dimensional direction, in case when an image has a periodicity caused by a screen pattern of two-dimensional area (for example, 4×4) just as a screen image (halftone dot image), moire of an affected streak is generated and a remarkable degradation of image quality can occur. For example, FIG. 14 illustrates an image onto which a process of interpolating the missing pixel included in the screen image with peripheral pixels in the horizontal direction has been performed. The affected moire has occurred in the interpolation position A.
In the interpolation method disclosed in JPA2005-117291 which is arranged to determine the density of the missing pixel so that the average density of the predetermined range containing the missing pixel and the average density of the predetermined range of the peripheral of the missing pixel not containing the missing pixel equal with each other, the method attempts to correspond to the periodicity of the screen pattern by widening the predetermined range and selecting the size of the predetermined range. However, in such interpolation method, only one missing pixel having an unfixed density can be included in the predetermined range that contains the missing pixel.
Namely, in case when two or more missing pixels having unsettled values are included in the predetermined range, the densities of a plurality of missing pixels cannot be individually determined only with a condition that the density average value of an area containing the missing pixel and the density average value of an area not containing the missing pixel are made equal to each other. This plurality of the missing pixels must be interpolated with the same density. Thus, the optimal interpolation cannot be performed. Therefore, in the interpolation method of JPA2005-117291, since the predetermined range for calculating the average value is limited to one-dimensional area, it was difficult to suitably interpolate corresponding to the periodicity of the screen pattern expanded to two-dimension. In case when one-dimensional predetermined range is expanded, a pixel at the end of the predetermined range becomes distant from the missing pixel when compared with the case in which the density is calculated with the two-dimensional area having the same number of pixels. Therefore, the relevance of the pixels in the predetermined range and the missing pixel becomes weak and the pixels in the predetermined range become undesirable as the peripheral pixel for presuming the density of the missing pixel.
The present invention is to solve the above mentioned problem. An object of the present invention is to provide a pixel interpolation apparatus, a pixel interpolation method and an image reading apparatus, which are capable of interpolating a missing pixel with natural connection even in case when the process is applied to a screen image.